Once you have added that com reference you can work with images and can read text from it.
this blog contains information for .net and sql stuffs. You can find various tips and tricks to overcome problem you may be facing in ...
Once you have added that com reference you can work with images and can read text from it.
In vs we find two options build and rebuild for our solution and very rarely we give attention what do we require.
There is very much difference between both of them, if you have noticed it, build takes less time compared to rebuild.
When we build application it complies files which has been changed it does not compile all files in project, while in case of rebuild it compiles all files weather it has been changed or not. Mainly rebuild should be done when so many files are changed and also it might possible some files are changed outside of IDE.
Hope this information will help to speed up your application when you choose rebuild instead of build.
Recently I come to know one requirement to hide tab pages on my tab control of windows form depends on some condition.
I thought there could be some properties like Visible as we have in other controls. But surprisingly there is no such properties exist.
At the end I have only one solution to remove my tabpage from tab control. Let’s go through some code.
I have following tabControls.
myTabControl is my Tab Controls and I have following sub tabs(tab Pages) in it.
tabPage1
tabPage2
tabPage3
At index of 0, 1 and 2 respectively.
To hide my tabPage1 on my UI I have following options.
myTabControl.TabPaegs.Remove(0)
or
myTabControl.TabPages.Remove(tabPage1)
I hope this could be helpful when we have some condition for showing tabs.
If you have tried to find main method in vb.net, you would not able to find it because vb.net automatically generates that method at runtime. We don’t require writing it. Developer who have worked with C# may find this problem most.
You can write your own main method that can be used at runtime. You can write your main method in a class or a module like below.
But you need be aware of one thing on your project properties
Application->uncheck Enable application framework. In this case, your main method will be invoked instead of automatic generated one.
Recently I have faced a very strange problem in my project, suddenly in some forms text of label wrapped when I run application.
I have not changed anything in my designer or code, though it was creating problem at runtime. I have compared my forms with older version, I also went through each of possible design property of forms but I didn’t find anything.
I had no idea what to do. Then I came to know that my project is in Vb.net and recently I have added my custom main method, if you have been using vb.net you would be aware there is no main method, framework create it runtime. But if you want to do something at startup you need to write main method in vb.net application.
So I got what the problem it was.
By default when runtime create main method it uses following setting for text render but if you are using your own main method at that time you need to add this line to your main method else it can create problem what I have faced.
Application.SetCompatibleTextRenderingDefault(False)
Sometime our dropdown lookup value are fixed and we don’t have any database table. In such situation we mostly make enum of our look up value.
But most of the time we are used to bind datasource of tables or list to combbox. So we might be wonder how to bind our enum to combobox.
Here is the simple way to bind combobox.
Say for example you have RoleTypes Enum.
public enum RoleTypes
{
Owner = 1,
Manager = 2,
AssitManager = 3,
Employee = 4
}
Now, to bind this enum to our combo box.
this.cmbUserRole.DataSource = Enum.GetValues(typeof(RoleTypes));
Set value to combobox.
this.cmbUserRole.SelectedItem = (RoleTypes)1;
To get value from combobox.
Convert.ToInt32((RoleTypes) this.cmbUserRole.SelectedItem);
Hi, all
Before a few days ago, I was using TFS as our version control system. When I tried to get latest for first time, It asked me for local path where It would be copied from server.
Later on, I needed to change my local path to somewhere else and when I was looking in TFS window to change my local path, I was wondered there were no such options which leads me to change my local working path.
I tried to find in web and I got solution.
In VsàFile menuàSource ControlàWork Space this will leads you a dialog box which shows all workspace on your computer.
You can change any of the lists by editing it.
I hope this will be helpful.