|
Well that method works, you could even pass in a reference to this in the constructor and set it that way in the child form. But if you set it it will be able to cycle back.
If you have an email I can make a quick demo project
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
I wanted to try out one of those starter kits on the asp.net website, but it told me I had to download MSDN...
So I did....
and when I click on the 'setup.exe' it comes up with a message box that say...
"A strong SA password is required for security reasons.
Please use SAPWD switch to supply the same. Refer to
readme for more details. Setup will now exit."
I checked the readme, but of course there's nothing there...
What is the solution???
/\ |_ E X E GG
|
|
|
|
|
Contrary to what you are saying, the MSDE readme (at least the sp3 version) has a section called Desktop Engine Setup Arguments. It is a high security risk installing MSDE with a blank SA password. That is why MSDE setup does not allow it.
To solve it, before installing it, you should edit the setup.ini file that is in the same directory as the setup.exe. The following line should be added:
SAPWD=yourpassword, where yourpassword is the password of your choice.
Then start setup.exe and installation will succeed.
Of course, if you want to disregard security and install without a SA password you can put the following line instead of the above.
BLANKSAPWD=1
This overrides the default behavior of the installer. But I strongly discourage you from using this last option since it opens a serious security hole in MSDE.
|
|
|
|
|
Ok, I choose your answer. It was the best... and easiest.
/\ |_ E X E GG
|
|
|
|
|
If you look at the download page http://www.microsoft.com/downloads/details.aspx?FamilyID=a0dac778-60a6-4b11-8aa8-bf12261a303a&DisplayLang=en[^], you'll see the following instructions near the bottom of the page:
After extracting the MSDE installation files, open an MS-DOS command prompt and change to the directory where you extracted the files. MSDE extracts to C:\sql2ksp3\MSDE by default. Run the following command to set up MSDE for Visual Studio .NET. Replace <your sa="" password=""> with the systems administrator's password that you would like to use:
Setup.exe /qb+ INSTANCENAME=VSDOTNET DISABLENETWORKPROTOCOLS=1 SAPWD=<YOUR SA PASSWORD>
|
|
|
|
|
ok, gracias.
/\ |_ E X E GG
|
|
|
|
|
What property controls the initial visible default state of a datagrid in a Windows .Net Form?
My application fills a datagrid during form load from a oledb database query.
When the form is loaded the datagrid is blank except for a cell with a + sign
Once the + is clicked then a second cell is shown containing a link. After the link
is clicked the grid then is filled with the data.
How can I programmatically complete the first two clicks so that when the form is loaded
the user sees a full grid of data instead of having to click on the + and then on the link.
Thanks so much
|
|
|
|
|
try referencing the table instead of the dataset
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
I need to convert WBMP (wireless bitmap) into regular bmp (or png or jpg), in my code. Anyone know any library that does that?
thanks
"Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read."
-Groucho Marx
|
|
|
|
|
Hi,
How to get the parameters (connection string etc) from a .udl file through c# code
Thanks in advance
Jerin
|
|
|
|
|
Open the file with a text editor, e.g. Notepad. Here's one I prepared earlier (lines broken for clarity):
[oledb]
; Everything after this line is an OLE DB initstring
Provider=Microsoft.Jet.OLEDB.4.0;
<font color=#c080c0>+</font> Data Source=C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb;
<font color=#c080c0>+</font> Persist Security Info=False As you can see, it's basically just an INI file format. You can find an INI file reader here[^].
|
|
|
|
|
Hi there.
I had 3 questions to ask.
1)
Public Event ButtonClicked(MessageBoxNumber As Integer, OKButton As Boolean, CancelButton As Boolean, ExitButton As Boolean)
--> how to code this in c#? If not mistaken, if they used the keyword WithEvent i will use delegates and events. But now is the keyword event! Any sample codes base on top?
2)
Public Property Let MessageBoxPrompt(MessageBoxNumber As Integer, ByVal vData As String)
MBox(MessageBoxNumber).Prompt = vData
End Property
MBox is a type of MessageBox
--> oh okay, i know c# got get and set, but there is no let. And can i assign property with arguments like MessageBoxNumber as integer, etc...
3) in vb6, you had in operator '\' for division integer, how can i achieve this in c#?
Any help, please?
Thanks.
Regards,
Chua Wen Ching :p
|
|
|
|
|
Public Event Buttonclicked(MessageBoxNumber As Integer,
OKButton As Boolean, CancelButton As Boolean,
ExitButton As Boolean)
...becomes...
public event ButtonClickedEventHandler ButtonClicked;
protected void OnButtonClicked(ButtonClickedEventArgs args)
{
if(ButtonClicked!=null)
ButtonClicked(this,args);
}
To raise the event:
OnButtonClicked(new ButtonClickedEventArgs(messageboxnumber,
Then outside your class, you will need:
public delegate void ButtonClickedEventHandler(object sender, ButtonClickedEventArgs e);
public class ButtonClickedEventArgs : EventArgs
{
int m_MessageBoxNumber=0;
bool m_OKButton=false;
bool m_CancelButton=false;
bool m_ExitButton=false;
public ButtonClickedEventArgs(int messageboxnumber,
bool okbutton,bool cancelbutton,
bool exitbutton)
{
m_MessageBoxNumber=messageboxnumber;
m_CancelButton=cancelbutton;
m_OKButton=okbutton;
m_ExitButton=exitbutton;
}
public int MessageBoxNumber
{
get
{
return m_MessageBoxNumber;
}
}
public bool CancelButton
{
get
{
return m_CancelButton;
}
}
public bool OKButton
{
get
{
return m_OKButton;
}
}
public bool ExitButton
{
get
{
return m_ExitButton;
}
}
}
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Why 1 vb6 short code, in c# i need to code so much?
Any idea?
Regards,
Chua Wen Ching :p
|
|
|
|
|
The C# way of doing it has many advantages, icluding:
* You can assign lots of different events to the same method.
* You can very easily hook and unhook events at runtime.
* The C# event implementation is much more flexible.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
VB is meant for RAD which mean they ignored details for you. Good for general purpose programming, bad for advanced.
|
|
|
|
|
As for question #2:
In C#, a property set is the same as a property let - and that's how things should be.
You cannot pass arguments to a property. You can, however, use indexers or a method.
And question #3:
Try casting the values to integers after performing division on them.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
For question 2, i got an error:
This is how i code:
public string SmallWindowPrompt(int SmallWindowNumber, string vData)
{
get
{
return this.SM[SmallWindowNumber];
}
set
{
SM[SmallWindowNumber] = vData;
}
}
When i compile, it says i need to place 2 semicolons right after get and set.
I just change the variable name, but it is based on question 2..
any help?
Thanks for everyone replies.
Regards,
Chua Wen Ching :p
|
|
|
|
|
In C#, properties cannot have arguments. But why not just publicly expose whatever that SM collection is, and therefore eliminate the need for that property?
BTW, here's a tutorial[^] on properties in C#.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Hi. My English not that good.. what you mean by:
why not just publicly expose whatever that SM collection is
???
Can show me an example?
Regards,
Chua Wen Ching :p
|
|
|
|
|
Make a property for the SM collection.
public type SmallWindows
{
get
{
return SM;
}
}
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Another way: You can make this an overloaded method or create two properties.
public string SmallWindowPrompt( int smallWindowNumber ) {
return this.SM[sallWindowNumber];
}
public void SmallWindowPrompt( int smallWindowNumber, string vData ) {
SM[smallWindowNumber] = vData;
}
public string GetSmallWindowPrompt {
get { return this.SM[SmallWindowNumber];}
}
public string SetSmallWindowPrompt {
set{ this.SM[SmallWindowNumber] = value;}
}
|
|
|
|
|
Question #3
The dividion operator is overloaded to handle both integer and floating-point division.
Search for "Operators Compared in Different Languages" in the Help topics.
cast the results to integer.
float i = 1199282.293F;
float j = 199.33F;
newResult = (int)( i / j );
|
|
|
|
|
I have created a .dll file to manage data with an sql server.
I want to build a new windows app that uses that .dll
2 Questions:
1. Where does the .dll file go? In the same directory as my project?
2. When I include the file, is it just like I define other classes?
Using namespace.class;
|
|
|
|
|
Assuming you are using Visual Studio.NET, open the solution explorer and right click on the "references" folder, select the "Add reference" menu choice, then click the browse button. Browse to your .DLL file, and click "OK". That will add a reference to your .DLL to the project. From there, just add a line at the top of your source file like this:
"using mynamespace;"
Martin Cook
Who needs cyberspace when you have CP space?
|
|
|
|