DatTimePicker in ActiveXControl Used in WEB app works only first time ? Not working afterwards - activex

I have VB.Net windows DateTimePicker control in my ActiveXControl . When I use this ActiveX control in my web application , my dateTime picker control works only first time when application is loaded . Afterwards it wont show the calendar at all . Also I am not able to debug the ActiveX Control from my web application .
Intersting thing is , when I use my AtciveXControl as seperate application and run , it works fine for me . But when used in WEB app , i am getting that issue . Please suggest/advice . Or is this any dll issue etc am not able to figure it out . thanks in advance .

I got the solution . The whole issue was because of one line - Application.EnableVisualStyles() .
(System.Windows.Forms.Application.EnableVisualStyles())
Hope this helps someone when in trouble .

Related

Xamarin Forms: Userdialogs showloading is not working in ios

I am using Acr.UserDialogs Nuget Package for showing the loading progress in my projects. It is working fine on android and windows, but not showing on IOS. I am using the following line of code for the progress dialog:
UserDialogs.Instance.ShowLoading("");
Version Details:
Acr.UserDialogs: 7.0.26
Xamarin forms: 4.6.0.726
Not added any initialization code on ios because it is optional.
For post services, the ShowLoading is working. But for the get services, there is no loading showing on the UI. I will add a sample project for the reference.
The latest version of the plugin is 7.1.x . You could firstly update the plugin and XF both in Forms and platform projects .
In addition , it would be better to invoke the method in UI thread if the line is in a child tasking .
Device.BeginInvokeOnMainThread(()=> {
//...
});
Update
In your sample , you invoke the line in constructor . Actually , it is not a good design . As in constructor the page hasn't finished loading yet . You could invoke the line in OnAppearing (you could set a property like isFirstLoad to let the dialog display one time )

Specific View not updating content after publish

This is the new little code on my View.cshtml:
#Html.HiddenFor(i => i.vVendaUnitarioSemImpostoSemFormatacao)
When I'm on debug mode, it works normally, but when I put in release mode and publish on azure, doesn't update what I've codded.
I've already tried:
Click on compiling before publishing in visual studio options.
Tried to set true on .csproj <MvcBuildViews>true</MvcBuildViews>
Publishing from another computer
Change another View from my project and works normally, but that one specifically don't.
Tried to put optimizeCompilations="true on <compilation> in web.config
Tried to copy and paste on ftp project to check if will work.
Someone can help me on that?
I saw this post Certain Razor views not publishing . What I did to resolve the problem was create another view, with another name and change the code where I'm calling the old view.

WebBrowser (VCL) Memory Leak Windows 2008r2

I have a form with a TWebBrowser dropped on it. When the form opens the following happens:
procedure TRouteMapView.FormShow(Sender: TObject);
begin
RouteMapView.Caption := 'Transport XLR - ' + Main.GlobalSite;
WebBrowser1.Navigate('https://****/map_only/' + TID);
end;
This loads a dynamic map for the optimized route. The problem is that if I close the form before the map is fully loaded the memory is not released. Even if I wait until it is fully loaded not all of the memory is released.
I tried following in Formclose without any success:
WebBrowser1.Stop;
WebBrowser1.Navigate('about::blank');
WebBrowser1.Free;
Strangely I am unable to reproduce the issue on Windows 10, but I have to support Windows 2008r2.
Any ideas what I might be missing here?
UPDATE 1
I've tried to Create the RouteMapView Form on Application Startup , and then just show and hide it as necessary . Unfortunately the "Leak" is still there and it's even worse .
I've also tried to wait till the WebBrowser is done , once with ReadyState and once with Busy , it seems to do something . But I guess the damn Website is executing a lot of scripts in the Background and even though it says done it is not done .
I also thought about that maybe the Website itself is the culprit . So I changed it to www.microsoft.com ( I mean if that leaks then it does not matter :) ) , but it did leak .
So I started to think about writing a Small Application which does nothing but show the map and then just closes . And I call it as needed and wait for it.
And then I realized , when I close my Application Completely ... the Memory does gets Freed , since when I start another Program again everything is working fine , even if I reached the 1.5GB mark before .
My knowledge is limited here , but is it possible to detect which instances of Internet Explorer were started by my Program and simply force terminate them ?
I created here a Small Program which does nothing but process parameters from my Main Application and Displays the Result in the Web-browser .
As far as I can tell I have no more Memory Leaking .
What I noticed with the External Program is , that sometimes when I called it I've received a error something about fwpuclnt.dll and sometimes dhcpcsv6.dll .
I was doing the Navigation on the Form.OnShow , so I switched instead to a Timer ,
when the Program is started I wait 2 seconds then I try to navigate . The Errors regarding the two dll's are gone now . I only receive sometimes an error from Internet Explorer itself , cannot navigate to page , click refresh . Otherwise it is fine.
Oh and I forgot to mention this is a Windows 2008r2 Terminal Server .
Regards
Robert

XPSDrv Sample Entry Point / Filters Squence

Finally, I managed to build XPSDrv Sample project successfully . But still there is a problem .
I need to execute a function ( to start an exe file ) after the xps file has been sent to the printer (in my case to local port). So , where and how can I add the function ?
And regarding the filters , how would I know the sequence in which the filters executed .
I really need a help in this matter because I am a beginner in Windows Driver Development , specially in Printer Drivers ...
Any Idea is highly appreciated.
Thanks in Advance
Which filters are included, and the order in which they execute, is controlled by the PipelineConfig.xml.
I'm not sure that launching an external executable after the document has cleared the pipeline is a particularly good idea, but if you must do so, you will need to add that functionality to the last filter in the pipeline.

Twitteroauth with localhost

I currently have a website up and running that uses the Twitteroauth classes (abraham's) and the Twitter API. It is all working as it should, however, I want to also run the project on my localhost for debugging/coding purposes so that I am not in danger of messing up my live version.
I am wondering if it is possible to run Twitterouth on localhost. I know that there are ways to manipulate the callback URL of the application on Twitter's site, however I do not want to do that as my live version needs the callback URL.
I hope this makes sense and I hope there is a solution out there.
Thank you.
It is possible to run Twitteroauth in localhost. You should make a copy of your project files from your website and copy it to your localhost.
You might see a file "config.php" where you'll define the callback url.
define('OAUTH_CALLBACK', 'http://localhost/path_to_callback.php file');
It will redirect you to your callback.php file and it works in localhost.
For running Abramham William's twitteraouth locally , you can create another test application on twitter so that it don't disturb the live version . Then instead of using localhost/ in your address bar , you should use the IP address of your localhost , this mistake by me consumed a lot of time .
Example :
127.0.0.1/twittertest/index.php and not localhost/twittertest/index.php in your address bar .
You'll need to give the same oauth callback in your twitter application .

Resources