|
Alt-F4 is already used by the forms context menu and is normally used to close an application, even closing Explorer and logging you off. Click on the little icon in the top left corner of the form and look at the keyboard shortcut for Close .
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
As I mentioned, my form does not have a ControlBox. I found the answer I needed as follows:
Set form.KeyPreview = True
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If Shift = vbAltMask And KeyCode = vbKeyF4 Then
Unload Me
End If
End Sub
|
|
|
|
|
In my table, I have three columns: first_name, last_name, middle_name . I tried to merge them into one column, and this is what I did:
select first_name + ' ' + last_name + ' ' + middle_name as Full_Name from contacts
However, when I do a query on that one, only the ones that have data in all three columns show and if one of the column is missing data wouldn't show.
for example,
orginal table
--------------------------------------
|first_name | last_name | Middle_name|
--------------------------------------
test | test | null |
--------------------------------------
when merges:
-------------------------
| Full_Name |
-------------------------
| null |
-------------------------
if column middle_name is empty, then Full_name would return null, eventhough first_name and last_name have data, why is that happening?
Could someone help me how to make that work?
Thanks a bunch.
John
|
|
|
|
|
|
it really does help. and I just found another way of doing that:
select isnull(first_name,'')+isnull(last_name,'')+isnull(middle_name,'') from contacts
|
|
|
|
|
When i fill a datagrid with a searchresult there apears two unwanted thing in the grid. A navigation button in the caption and the text "NewDataSet below it. If i use a dataviev they disapear.
How can i get rid of them without using a dataviev (and why are they there, seem useless)?
John
|
|
|
|
|
You solution is to bind the DataGrid to the DataView, not the DataTable itself. DataViews are used so you can sort the data and reorganize the columnns/tables without having to refetch the data into the table again using the new sort or table/column organization. You reorganize the view of the data (which is quicker) instead of wasting time refetching the data from the database with the new view parameters.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Just put something like this:
dataGrid.DataSource = dataset.YourTableName
|
|
|
|
|
You dont learn programming in one day, no matter who you are....
|
|
|
|
|
tan12 wrote:
i need basic codes of timer ,command buttons ,loops and etc for desining my process as i am totally unaware of basics involved in programming and the correct syntax through which will control my process
If you don't know the first thing about programming, and your past your deadline, you're already screwed. For all the basics on how these things work, you'll have to read the documentation, complete with plenty of examples on how they work. Some things are like building blocks, like the Timer controls, others are far more abstract, like loops. You must LEARN how to put them together to get them to do what you want. There is no set formula that will show you how to do it.
This is for Visual Baisc .NET:Visual Basic .NET Concepts - Getting Started[^]
For Visual Basic 6:Topics for a Quick Start with Visual Basic[^]
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
does any one know how to workaround the memory issues with the tree view web control.
|
|
|
|
|
First, your question really belongs in the ASP.NET forum[^] since it has nothing to do with Visual Basic .NET.
Second, what memory issues? How did you come acrossed these issues and what documentation do you have (links would help) that says this is an issue?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
This morning I changed the PROJECT properties of a VB6 program I'm doing,
After that, when I try to execute it, it gives me the Error Message Box "Sub Main() doesn't exist...
Only problem is it gives the same error in all the other versions of the program I have, even the older versions which I haven't touched or changed
I got to give the project in today...
PLEASE HELP VERY URGENT...
THANKS
|
|
|
|
|
have you renamed any of the files in the project? chances are you just renamed the default startup object and therefore the project is now looking to start from Sub Main(). Since it doesn't exist it's throwing up the exception.
to fix, just go into the project properties and set the startup object to whatever form you want to be the application's main form.
-jim
|
|
|
|
|
What did you change in the project properties? Did you try making a new test project (like a blank Windows application with just an empty form) and seeing if that works?
Without knowing anything about your project, the only suggestion we can make is to recreate the project, place all the controls again, and copy and paste the code from your previous project into this one.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks,
Now The project if started correctly starts from Globals(MODULES), which tells the first form to start.
It has a Sub_main().
So I tried to start it as
PROJECT TYPE:Active DLL
Startup Object:Sub Main
Now it gives the MsgBox " User-defined type not defined"
The thing is, I didn't change the code...
Just the Project Properties...
And even the old versions are giving me the same error..
I tried creating a New application (a simple button and TExt) and it works.
I would copy and paste everything but the project is to long...
And the bosses here are MAD...
Is there anything else I should try?
|
|
|
|
|
paddy1234567 wrote:
PROJECT TYPE:Active DLL
There's your problem. ActiveX .DLL's don't user a Main . In order for this to work, you'll have to convert the project back to an .EXE. You can't use a Main in any .DLL's.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave Kreskowiak wrote:
There's your problem. ActiveX .DLL's don't user a Main. In order for this to work, you'll have to convert the project back to an .EXE. You can't use a Main in any .DLL's.
That is totally and utterly incorrect. A DLL MUST have a public class that can be created by an external user. HOWEVER it can still have a Sub Main. If so, Sub Main defines the entry point to the DLL.
You can have two startup settings for a VB DLL:
None:
The public class Initialize event provides the DLL entry point and this is the first code to run.
Sub Main:
You still have to have a public class to instantiate the dll. However, if you define Sub Main as the start up object, what happens is:
1) Your external client creates an class object in the dll.
2) In response to the request for the class object the dll FIRST executes all the code in Sub Main.
3) The dll then fires the requested class's Initialize event and returns the class object reference to the caller.
Now, what you CANNOT have in a VB DLL is a form as a startup object. Your options are "None" and "Sub Main".
|
|
|
|
|
I have written a MDI in VB.NET which is working fine. I decided to put my own icon on the forms (top left), and this too worked fine on all the children forms.
The problem I have is that the parent form is not called form1 (the default) and as I understand it, when I set the icon the form1.resx file is still applying the icon to a form called form1, when it should be apllying it to whatever I renamed form1 to. This causes an error when I run the program. If I replace the form1.resx and the form1.VB file with backups I took just before I changed the icon, it all works fine (without the icon).
Can anyone tell me (in an idiot proof way!) what I need to change in the resx file to get it to work with the icon?
Thanks a million.
|
|
|
|
|
Are you changing the icon in the icon property within the property grid when in design mode for the form?
If you are I can't see how changing the name of the form will cause any problems... or am i missing your point?
Tom
|
|
|
|
|
Hello there
I am building one database setup wizard in VB.Net . In which on click event I need to create database with tables, Views ,Triggers and procedures.I have the script on one Script file.
So how to run that file from vb code to create database on specified server.
Best Regards
Rizwan Bashir
|
|
|
|
|
Is it any way to do this? I get an IE window containing a msword document and need to access its automation methods.
Help me!
Thanks.
"When I look into your eyes, there´s nothing there to see, nothing but my own mistakes staring back at me"
|
|
|
|
|
I PLANED TO DO MY MAIN PROJECT IN VB.NET. IN VB.NET I WANT TO DO "COMMUNICATION MANAGEMENT PROTOCOL LIBRARY" PROJECT. SO YOU PLEASE SEND THE SOURCE CODE OF "COMMUNICATION MANAGEMENT PROTOCOL LIBRARY" TO MY E-MAIL ADDRESS. MY E-MAIL ADDRESS IS: myjamalmd@hotmail.com
THANK YOU.
jamal
|
|
|
|
|
3) STOP YELLING!
2) N-one knows what your talking about when you say "communication management protocol library"!
1) Write it your damn self! No-one here is going to write it for you or supply it to you. That's not why we're here. We're here to answer questions about programming problems you may have, not be your personal servant for finding stuff on Yahoo[^] or Goggle[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I am creating a usercontrol in VB.NET and calling it by VB.NET application. I would like to generate button click event of button(which is in the form of application which use my UserControl) from UserControl. Can anyone explain me how do I know the which form(name of form) of application is using my usercontrol and how to generate button click event?
I look forward to your replies.
thanks,
atul
|
|
|
|