|
I have no idea why this is happening. The code doesn't show anything that would cause it.
I'd remove the MsgBox lines and just step through the code, line-by-line, using the debugger and watch the variables involved.
|
|
|
|
|
Hi Dave,
I had already used the debugger while working line by line. I added the message boxes to make it easier to try different variations.
The only thing the code shows is that I stupidly added the FileType Enum as an argument to a call that didn't ask for an argument. The result was explained to me by in a very elegant answer from Armin Zingler at:
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.dotnet.languages.vb&mid=03cf9ea6-b81a-48fe-ad43-f1f48517dbdc[^]
I've copied his explanation here:
************************************************************
This is awesome... The thing is that
GetDefaultFileExtensions(m_FileType)
is short for
GetDefaultFileExtensions.Chars(m_FileType)
because Chars is the default property of a String, and because
GetDefaultFileExtensions does /not/ have arguments. As m_FileType is 0, this
is actually
GetDefaultFileExtensions.Chars(0)
So, you get the first char of the string, which is "*" only.
Armin
************************************************************
Cool huh?
Tom Garth
Developer
R. L. Nelson and Associates, Inc., Virginia
|
|
|
|
|
Oh my God! I was poking through that code for an hour and didn't see it! :->
|
|
|
|
|
Hello friends of the Forum
I go to their valuable help with the following problem
It is possible from net to automate Directory Activates.
Concretely I want to activate the directive one that this in
Configuration of User
Administrative insoles
System
And to enable the directive one
Alone to Execute applications of allowed windows
And to establish the list of programs EXE that the user can execute, I can them
to select of a list.
Example: winword.exe, excel.exe, etc.
My idea is that the user can make it from ASP.net
I wait their valuable help, and thank you for their time
|
|
|
|
|
I need some help getting a icon for my vb.net program. I don't want to use the default icon shown in the application's project properties. Any ideas on how to change the icon for a vb.net program and where to get the icons from?
jds1207
|
|
|
|
|
If you have an icon in your project, you can double click on it and Visual Studio will open an icon editor so you can make your own. Or you can search on-line to purchase or find some free icons to download. Simply include the icon you want in your project. Then go to your application's properties and select the icon. If you want the icon to appear on the upper left corner of the form, you have to select the form and change it's icon property to the icon of your choice.
Hope this helps.
|
|
|
|
|
Hello,
I want to code something similar to tabcontrols but different enough to warrent a new control.
I have simplified my issue:
I want a user control to which I can add multiple pages (panels) of windows form controls
in design time , then use those pages in runtime. Also in design time I want to navigate between the panes.
I guess my user control needs to have a designer based on System.Windows.Forms.Design.ParentControlDesigner created but...
I was wondering if anyone of you people can recommend a good guide/article/ even a book to designtime coding using vs2005
any tips/advice ? (not rude please!!)
most of the articles I have google'd were either vs2003, c# or just plain awfull. The msdn2 articles I have read where barely understandable.
any help would be appreciated
(lost , confused , alone - stuck in design time - sigh)
thanks
Martin
life is a bowl of cherries
go on take a byte
|
|
|
|
|
I personally hate Design time programming! There is a great book on custom controls called: "Pro .Net 2.0 Windows Forms and custom controls in C#" by Matthew MacDonald. Publisher: Apress. I think there is a VB.NET version. Just as a tip (that you might not like): You will find a lot more help with intense topics like this if you are programming in C#. I used to be a diehard (beginning) programmer and I hated C# when I first started using it. Now I wouldn't go back to VB.Net for anything. (million dollars maybe)
Hope it helps!
Richard
|
|
|
|
|
hi,
thanks for that
c# seems to be the next comming thing but argh I find it cumbersome to read!!
I have programmed in Delphi, RPG , C++ , VBA , VB etc but c# just seems - ugh!
cant place why though - maybe its too much like javascript - maybe I dont like braces!! (tell me why! I dont like mon.... er sorry cant get that tune out my head)
I will probably trickle into it eventully.
Of course it doesnt help if your company is currently a VB shop - anyhoo...
you havent seen any good online articles have you??
thanks
martin
life is a bowl of cherries
go on take a byte
|
|
|
|
|
Is there a way to find the task bar Y location? I want a window to come up right above the task bar. Some people like myself raise the task bar up to be able to see the many programs that I have open.
|
|
|
|
|
if you only have on screen then you can compare primaryscreen.bounds.y with primaryscreen.workingarea.y . The bounds will give you the whole screen resolution and the working area will give you that minus taskbar. Make sure that you take into account that the taskbar can be on any side of the screen.
|
|
|
|
|
When a user clicks a button on a form it calls a function in a module. The function is very math intensive and may take 5 minutes or more to run. The user may not want to wait that long so I want to have a cancel button on the form that would terminate the function. How can that be done?
|
|
|
|
|
put the function inside a backgroundthreadworker , which runs in a separate thread , then if the user hits cancel
kill the backgroundthreadworker
HTH
Martin
life is a bowl of cherries
go on take a byte
|
|
|
|
|
Declare An Boolean Variable , while clicking cancel button pass values to that boolean variable , then check the condition using 'if' statement
if boolean = False skip that coding else execute that coding
reply, How It Helped
Prabumj@gmail.com
|
|
|
|
|
Hello,
yes your suggestion would work fine but:
it depends on the complex maths functiion being rewritten to check the boolean value constantly so it does a bit of maaths , checks the flag ,it does a bit of maaths,checks the flag , it does a bit of maaths,checks the flag etc ad nausium
Whereas:
with the threading solution
1. the maths function does not change - only the place it is run from (the background thread worker)
2. When the cancel button is pressed , the code behind can kill the thread instantaniously , so from a user perpestive , it seems more responsive.
what do you think??
thanks
Martin
life is a bowl of cherries
go on take a byte
|
|
|
|
|
in VB.net 2005 I have problems when i try to insert new record in Access database with Update method.The record has a field Autonumber.And after inserting , in dataset the value of this field is 0, in database is ok.
|
|
|
|
|
if you are inserting data by dataadaptor and you donot fill dataset after inserting it can be happen . so I think it is better you fill your dataset after per record inserting .
|
|
|
|
|
Thank you.
The record is inserted in dataset with add(row).But when the dataadapter.update method is executed the record in database is ok , but in dataset the atonumber field is 0.
Yes , is possible to fill again the dataset but the application is running on network and if i fill dataset everytime i add new record slow down the app.
i know there is a method Select identity but i don't know how to do it.
|
|
|
|
|
How do i detect the ring back tone from my application when it dials to cellphones. i.e i want to end the call after a single call back.
Any thing am ready
|
|
|
|
|
Programmatic Missed Call?
|
|
|
|
|
hi all
i draw a polygon on a form and on a control also
now i need to capture the mouse events of that polygon so that the polygon can be placed anywhere on the form or control
the polygon had 5 edges and i need to capture the x and y position of the mouse where the polygon has been released by the mouse on the form
thnx
help everyone
|
|
|
|
|
depends on the language you use
for vb6
when mouse is down (or clicked) a boolean should be changed to true
while the mouse moves this boolean is true and when the mouse is released (or is clicked again) it should be false.and shapes are object by themselves and you can determine x and y in the event subroutine
But for Vb.Net
you have to make your own region and set the region of a usercontrol or control to that region.
now everything is like vb6
A.E.K
|
|
|
|
|
i use vb.net,
can u tell me more about region and a fair idea about the work
how can i find that mouse has been clicked on that graphic because the graphic does not have the mouse events
i have two graphics on the form. how can i differentiate
thnx for reply
help everyone
|
|
|
|
|
The region class is defined in .Net so in vb6 you have to make an ActiveX and change its region to the corresponding shape using API functions.or you can add a control like picturebox to your form and using its hwnd and APIs change its shape.
so when you add this ActiveX to your project you will be able to use its events and a picturebox has its own mouse events.
A.E.K
|
|
|
|
|
i don't have the picture box, i have a graphic object (a polygon) drawn by my self. is it possible with out using api, or any other way to the work.
any other suggestion
help everyone
|
|
|
|