|
This is what I used the last time I needed this in Load event (formSplash is a borderless form).
Hide();
bool done = false;
ThreadPool.QueueUserWorkItem(
(x) =>
{
using (formSplash = new FormSplash())
{
formSplash.Show();
while (!done)
Application.DoEvents();
formSplash.Close();
}
});
done = true;
Show();
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Thank you for the code but a borderless form and a label does a little bit different comparing to the screen in screenshot.
|
|
|
|
|
You can use whatever border style you like if you set the form's ControlBox to false and Text to empty.
Alternatively, override OnPaint in the splash form and draw your own border etc eg.
protected override void OnPaint(PaintEventArgs e)
{
using (Pen pen = new Pen(Color.FromKnownColor(KnownColor.InactiveBorder)))
{
e.Graphics.DrawRectangle(
pen,
new Rectangle(
Point.Empty, new Size(Width - 1, Height - 1))
);
}
base.OnPaint(e);
}
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
|
|
Hi,
That looks remarkably like a button without a focus rectangle to me.
public class CuelessButton : Button {
public CuelessButton() {
}
protected override bool ShowFocusCues {
get { return false; }
}
}
Now dock it in a borderless form.
public partial class SplashForm : Form {
private CuelessButton button1;
public SplashForm() {
InitializeComponent();
this.button1 = new CuelessButton();
this.button1.Dock = System.Windows.Forms.DockStyle.Fill;
this.button1.Text = "Please Wait ...";
this.Controls.Add(this.button1);
}
}
Umm, I think that needs a bit of work but it looks about right!
Alan.
|
|
|
|
|
I recieved this error when i try to build my project
Files has invalid value "<<<<<<<<<<< .mine". Illegal characters in path.
All I did was clean up some basic coding. It doesn't have a line reference. I did a full solution seach but found nothing.
|
|
|
|
|
Try to search on google.[^]
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
DID, But got help from another site. solved
|
|
|
|
|
That's fine,so share here that solution because it can be help for someone else.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
|
Hey everyone,
Any idea how can we trace the associated application of a given extension.. you know, the one that fires up as the standard associated application when double clicking a file, say WINWORD.EXE file for .doc and .docx, maybe WinZip.exe for .zip and .gz
Please help.
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
You will have to digg in to registries for that. Even this[^] article might help.
modified on Sunday, July 5, 2009 12:21 PM
|
|
|
|
|
Thanks mate!
I still have a question though, you see, I just want to trace the executable file to extract the icon, do you think you can help on that?? I have a listview control and when loading different files with different extensions, I want to give each file it's associated application icon and what you show me is the opposite..
Any idea??
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
|
Yayks! Did I need all this Looks quite informative but can you kindly point out for me what part exactly covers my problem?? Thank you Giorgi, and by the way, I bookmarked your wonderful article.
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
The article has table of content so it should help
|
|
|
|
|
Thanks mate!
Your "Extracting Icon by Extension" part is just what I needed, unfortunately, the thread cant be close, thanks to some passerby who voted your upper post to 1 so it balanced to 3 and hence still open!
Thanks again my friend!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hello,
i'm add a web service in C# win app throw a local network, so the WebService at another PC..
the webservice is added sucssfully and i see all the methodes in it ex: 'CheckUser'..when i create an object from webservice this error is appering to me..
ERROR: 'System.Web.Services.WebService' does not contain a definition for 'CheckUser'
so any help in that ERROR...!!!
Thanks
|
|
|
|
|
Check the web service for that method and its parameter types.
|
|
|
|
|
public WebService WebServ = new WebService();
WebServ. // when press ' . ' no one of he mehods is apper..
|
|
|
|
|
1. Is your code able to recognize the web web service?
2. Right click on the web service node in the Solution Explorer and select View in Object Browser. See what methods does it exposes.
|
|
|
|
|
i see all the methods but when i use it gets this error..
ERROR: 'System.Web.Services.WebService' does not contain a definition for 'CheckUser'
and all methods also..
|
|
|
|
|
Mtyb wrote: System.Web.Services.WebService
This is a .Net class. You will find the method in the object of the web service you have added and not this one.
You need to add reference to the web service you need to consume. Then create its object and call the method.
PS: How come I didn't noticed the class name? Oh yes...it was Wimbledon final.
|
|
|
|
|
Hi, suppose i have an imaginary web address like this with all the query parameter:
http://sokim.seltekom.com/sokim/index.php?do=queryWrite.rewrite&varA=89898&post=1&edat=02-07-2009
I'm using a source code from http://blog.brezovsky.net/
(How to Post data in C# . NET HttpWebRequest)
This is the code :
public static string Post(string url, string data)
{
string vystup = null;
try
{
//Our postvars
byte[] buffer = Encoding.ASCII.GetBytes(data);
//Initialisation, we use localhost, change if appliable
HttpWebRequest WebReq = (HttpWebRequest)WebRequest.Create(url);
//Our method is post, otherwise the buffer (postvars) would be useless
WebReq.Method = "POST";
//We use form contentType, for the postvars.
WebReq.ContentType = "application/x-www-form-urlencoded";
//The length of the buffer (postvars) is used as contentlength.
WebReq.ContentLength = buffer.Length;
//We open a stream for writing the postvars
Stream PostData = WebReq.GetRequestStream();
//Now we write, and afterwards, we close. Closing is always important!
PostData.Write(buffer, 0, buffer.Length);
PostData.Close();
//Get the response handle, we have no true response yet!
HttpWebResponse WebResp = (HttpWebResponse)WebReq.GetResponse();
//Let's show some information about the response
Console.WriteLine(WebResp.StatusCode);
Console.WriteLine(WebResp.Server);
//Stream s = WebResp.GetResponseStream();
//StreamReader sr = new StreamReader(s);
//Now, we read the response (the string), and output it.
Stream Answer = WebResp.GetResponseStream();
StreamReader _Answer = new StreamReader(Answer);
vystup = _Answer.ReadToEnd();
//Console.ReadLine();
//Congratulations, you just requested your first POST page, you
//can now start logging into most login forms, with your application
//Or other examples.
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
return vystup.Trim() + "\n";
}
This is what i do:
static void Main(string[] args)
{
Console.Write(Post("http://sokim.seltekom.com/sokim/index.php",
"?do=queryWrite.rewrite&varA=89898&post=1&edat=02-07-2009"));
Console.ReadLine();
}
The problem is, the Console always give me the login page source code. I think maybe it's because of wrong url or data pass to the function. But after i try many combination (like remove the '?' sign) it keep give me the login page html source.
For information, the web site has a login page where i must enter user id and password
and i have privilege to access it.
Before i run the above code, i manually sign in to the web site (i think so i can have session registered on the server). After that then i run the above code.
What i'm trying to do is, pull the data from the web page on html format, then with a few string function to get the actual data i need from the html source code.
It has many link inside that it will exhausted to do it manually.
I want make a program to pull the data out and save it to my database.
Can anyone help?
|
|
|
|