|
A simple Google search will yield many examples.
|
|
|
|
|
I made a google search...but i was not satisfied!!!
|
|
|
|
|
Why is that ? Perhaps if you want help, your best bet would be to say 'I searched google and found examples, this is the code I've ended up with, but it still doesn't do what I want because.....'. That way, we'd know you'd tried to do more than ask us a basic question that google could answer.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Showing forms modally or modlessly is one of the basics of windows forms development and should come on page one of your textbook, or close to. Seeing as Google throws up the definitive Microsoft document at the top of the list as well, I fail to understand your lack of satisfaction.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
I assume by 'system modal' he means a dialog that must be dealt with before the rest of the system reacts. I admit, I'm not sure how one would go about doing that.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
linto_11 wrote: system modal dialog box
My apologies, I may not have understood you completely. Do you really mean system modal here, as I do not think such an option exists any more.
|
|
|
|
|
System Modal dialogs don't exist in Windows NT and above. They only existed in Windows 9x and below. So, are you talking about an application modal dialog??
|
|
|
|
|
Hello,
I am trying the following code with MS-SOAP Toolkit v3.0:
Dim Connector As New HttpConnector30
Dim Serializer As New SoapSerializer30
Dim Reader As New SoapReader30
Connector.Property("Timeout") = 0
Connector.Property("RequestHTTPHeader") =
"Authorization: Basic " & encode64(gstrDatabaseName & "\" & gstrUserName & ":" & gstrAppUserPwd)
Connector.Property("WinHTTPAuthScheme") = 1
Connector.Property("EndPointURL") = "http://servbus/general/Usuario12V1?WSDL"
Connector.Connect
Connector.BeginMessage ' serializing the SOAP message here
Serializer.Init Connector.InputStream
Connector.EndMessage ' Gives the ERROR here!
But even though the same works perfectly with "http://", it is giving the following error with "https://":
Runtime error '5400'Connector: SSL certificate common name (host name field) is incorrect HRESULT=0x800A1529 - Connector:
Unspecified HTTP error. HRESULT=0x800A1518
Since the same service works fine if I invoke it from my IE6, I suppose the certificate should be fine. But this is something mysterious, and no material about this error...
Am I doing something wrong? Please suggest me a solution for this...
Thanks a lot!
Eduardo da Silva Ferreira
Svs Info Developer
Telephone +55 16 3324-9294
Mobile +55 16 8804-5898
Email eduardo.s.ferreira@gmail.com
|
|
|
|
|
Hi, i want to know how to create a instance of this Type:
System.Threading.TimerCallback
using reflection....
its usually created with this...
Dim myTimerCallbck As New System.Threading.TimerCallback(AddressOf MyFunc)
but with reflection ...
i found 1 constructor....
and it has 2 parameters.... 1 Object and 1 IntPtr....
and i have this objects to work with:
dim theDel as [Delegate]
dim theType as Type 'TimerCallBack Type
dim theConstructor as Reflection.ContructorInfo ' the only timerCallBack contructor
dim theParamsType as Reflection.ParameterInfo ' the 2 params are [ Object as Object and method as IntPtr ] found in the constructorInfo
i was trying using this
dim theArgs as Object() ' its a 2 length object
Return Activator.CreateInstance(theType, theArgs.ToArray)
i tried to send theArgs with
dim theArgs = New Object(){theDel,nothing}
Return Activator.CreateInstance(theType, theArgs.ToArray)
or
dim theArgs = New Object(){nothing,theDel}
Return Activator.CreateInstance(theType, theArgs.ToArray)
... but of course i get errors...
'i also found this function that return a IntPtr
Dim intptr = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(theDel)
'and tried send theArgs with:
theArgs = New Object(){theDel,IntPtr}
Return Activator.CreateInstance(theType, theArgs.ToArray)
'or
theArgs = New Object(){nothing,IntPtr}
Return Activator.CreateInstance(theType, theArgs.ToArray)
But Again... the same error System.ExecutionEngineException
and now i don't know what to do....=/
How Can i Fix this??? Any Help is Welcome
'English isn't my first language....sorry!
|
|
|
|
|
Hi,
I don't know, however I think you can work around it, by providing a regular callback (static code, no relection), in which you call the actual callback method using reflection in the normal way.
Luc Pattyn [Forum Guidelines] [My Articles]
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
im creating a class that can take a string and read as a custom code , execute methods and return a object(or nothing) ....
lets name this class as StringToCode
ie.:
dim query as string = "'Hello World!!! Today is ' & new('System.DateTime').now.tostring"
dim result = StringToCode.query(query).getresult() ' result = "Hello World!!! Today is 15/11/2009 19:46:10"
now i was trying to create a threading.timer object to run a method named 'Loop' from the the main form ....
Dim sNewCallbackQuery as string = "new('System.Threading.TimerCallback',null,addressof(opt,'Loop'))"
Dim snewThrTimerQuery as string = "new('System.Threading.Timer'," & sNewCallbackQuery & ",null,0,100)"
Dim optionalObj as object = me
StringToCode.query(snewThrTimerQuery,optionalObj).getresult()
when i call the query method.... i pass the queryString and me as optional object.....
the query method takes "addressof(opt,'Loop')" and tranform into a delegate
that is the loop method from the 'opt' object...that is the method Me.Loop
but the method fails on the creation of the timerCallback object...
because as i said in the previous post,
i dont know how to create it using reflection having the delagate as a parameter
|
|
|
|
|
Did you look at Delegate.CreateDelegate() ?
I've never used it, but it seems close to what you need.
Luc Pattyn [Forum Guidelines] [My Articles]
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Yes...
Dim sNewCallbackQuery as string = "new('System.Threading.TimerCallback',null,addressof(opt,'Loop'))"
Dim snewThrTimerQuery as string = "new('System.Threading.Timer'," & sNewCallbackQuery & ",null,0,100)"
Dim optionalObj as object = me
StringToCode.query(snewThrTimerQuery,optionalObj).getresult()
when the StringToCode parses this part : "addressof(opt,'Loop')"....
it uses the [Delegate].CreateDelegate to create the delegate of the 'loop' method of main form....
and i have to use this delegate to create the TimerCallback Object....
im stuck in this part!!
if i manage to create the System.Threading.TimerCallBack object....
then i can create the System.Threading.Timer object with the callback as a paramater....
and the loop method will be called every 100 milisecs
|
|
|
|
|
Hi,
I have developed a small application for Windows Mobile 6.x OS with VB.net and When I browsethe available .NET references, The Microsoft office com objects are not listed. My aim is to convert a listview to an Excel file in mobile application. Therefore I intended to define "Imports Microsoft.Office.Excel" statement but there is no office com objects. How can solve the problem
Thanks.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
Do you have office or the visual studio tools for office installed?
|
|
|
|
|
You are a bit stuck I'm afraid. Referencing the Excel Automation objects will not work for you because it is not Excel you are interfacing with, but rather Pocket Excel. Problem is that Pocket Excel does not expose and automation interface, therefore you cannot do it.
I have heard that there are third party products that enable you to work on the underlying files directly. www.tmssoftware.com[^] provides some of these, though I have never tried to use them.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
Hello!
I am wondering how i send console commands like:
give weapons_Whatever
or
Sv_chats 1
to counter-strike: source with my vb.net application.
I am thinking of my app as a Trainer . . . .
I dont whant it to send keystrokes I whant it to send actual commands . . .
|
|
|
|
|
You would have to hook the actual application if you didn't want to send keystrokes.
|
|
|
|
|
None is going to help you cheat.
|
|
|
|
|
At least he's cheating at a game and not homework.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
After playing Modern Warfare 2 (IMHO, the Game of the Century!) on XBL, I don't care if he's cheating at TicTacToe. It still pisses me off that someone would rather cheat than improve their own skills at the game!
|
|
|
|
|
Sorry for what must be a very basic question, but here goes:
My main project is getting too big, so I want to move some of my classes to a class library
Once I do that, however, the classes can no longer find the classes in my main project
What's the solution?
I can see that it could be possible to reference the main .exe from the .dll but doing so seems odd to me because the main .exe also references the .dll.
Thanks
|
|
|
|
|
Referencing both ways can be done, but not in one solution. However this would just indicate your design is wrong. Classes in your class library should be used by the main app classes and not reference them. If you have to reference them then either move more classes to the class library or move them back into the main app.
As to getting too big, we have projects containing hundreds of classes, which is fine when they are organised in a decent folder structure. I have heard of projects that extend to thousands of classes and take up to an hour to build without problems.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
Create a class Library... Produce a Dll and then Reference it.
This might be the simplest. But do you think all the units by this way may have produced a unseparable block.
The main motive of making external class libraries and compile as dll is to create independent module.
I recommend you to refactor each classes to produce independent modules and then reference it. I think the compiler is intellegent enough to load the dll when required.
I wrote a fine article to demonstrate how dependency between modules might kill your performance. Check it out.
Simplify Code Using NDepend[^]
So as suggested, To separate classes is not what you are making. If you just want to separate classes, make a folder place them.. and you might call them using a namespace. But if separation is really required, you need to find out classes that are actually independent of other modules(Such as utility classes).
Hope you understand.
Cheers..
|
|
|
|
|
A small correction, assemblies are loaded by the Runtime, not by the compilers.
|
|
|
|