winapp

Resources related to Hiding and showing a windows form

。_饼干妹妹 提交于 2020-01-11 13:29:31
问题 I have a form which has a picturebox and after clicking on a button another form will appear with a picture box containing the exact same picture. I use this line of code: Image1.Image = vImage.Image The thing is after I do this i need to hide the form and show it again to be able to see the changes. I cause me a blink for user which I want to avoid or do an equivalent of hiding and showing a form. How is it possible, the code looks like this: Public Sub UpdatePhoto(ByVal FullName As String,

text on progressbar in c# [closed]

强颜欢笑 提交于 2020-01-07 09:36:13
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 8 years ago . I am using the following code. Why does it not run properly ? private void Form1_Shown(object sender, EventArgs e) { for (int i = 1; i <= 100; i++) {

Need a Security Scenario for asp.net webservice

廉价感情. 提交于 2020-01-02 13:31:13
问题 I have developed a .Net 3.5 windows forms application. I also want to design a website that has a webservice with multiple Webmethods to query the database on the host machine. I want the webservice to be called ONLY through my winapp and my website! And I don't want any other people to be able to call and use my webservice but only some people who have access to the windows application that I have developed. I need a good security scenario for this! I truly appreciate anyone who can help me

high DPI problems

て烟熏妆下的殇ゞ 提交于 2019-12-19 03:19:16
问题 I have a problem with the display of our .NET Windows application under high dpi settings. All forms are set to AutoScaleMode = DPI, but this does not solve all the problems. Basically labels end up expanding in size to cope woth the font being bigger, but the location of other controls does not change and we end up with lables obscuring other controls or eachother. The screen should look like this: http://www.manageinvest.com/good.jpg ..and on high DPI it ends up looking like this: bad.jpg

How to delete button border after clicking outside of Form C#?

放肆的年华 提交于 2019-12-13 06:33:25
问题 I made a simple button, but when i click outside of win form my button getting a black border. By the way i set BorderSize to "0" and it works great while i clicking inside of my form. this.button.FlatAppearance.BorderSize = 0; That's how it looks like. 回答1: it seems a focus problem. Try to reset the focus when the cursor leave the control. 回答2: Add these lines of code to your forms load event. btn.FlatStyle = FlatStyle.Flat;//You can also use the popup flat style btn.FlatAppearance

Format of the initialization string does not conform to specification starting at index 128

十年热恋 提交于 2019-12-13 04:33:15
问题 Mine is C# windows application. When i run this application in my local machine it gives following error:- "Format of the initialization string does not conform to specification starting at index 128". try { string path = System.IO.Path.GetFullPath("E:\\09-2013\\SalesRep\\Openleads.xlsx"); if (Path.GetExtension(path) == ".xls") { oledbConn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + path + "Extended Properties=\"Excel 8.0;HDR=Yes;IMEX=2\""); } else if (Path

A strange minor problem in moving a picture from a box to another

偶尔善良 提交于 2019-12-12 06:05:00
问题 Hey Guys. I am having this simple line of code: Image1.Image = vImage.Image Image1 is a picture box in child window and vImage is a picture box in parent window. When I open the child window for the first time, I see a complete blank picture in Image1 while at the same time vImage is having a picture on it. When I Hide and reopen it again It has the picture on it. What is the problem and how can I fix it in my Code? Thank you 回答1: Add Me.Refresh() after that statement. This will call the

StartPosition problem in C#?

若如初见. 提交于 2019-12-12 05:59:48
问题 I wanna show my WinApp in Center Screen, so I set StartPosition property to CenterScreen but the window doesn't show in center of screen. What's wrong with it ? Am I missing something? P.S: I show the window from a main window and with a button. Edit: The code that I'm using to show the window. Form_CO form_CO = new Form_CO(); void button_CO_Click(object sender, EventArgs e) { try { //StaticVariables.Form_CO_IsShown is to prevent opening the same multiple windows if (!StaticVariables.Form_CO

How to paint our changes in runtime before its being viewe by user

不问归期 提交于 2019-12-11 23:51:37
问题 I am having a windows form that whenever I want its controls like picturebox update normally I need to hide it and show it to let the cahnges happen. This causes a blink which I want to avoid. Does anybody know what are my options? It is a picture box from form1 being copied to form2 and let the user see the changes. Thanks 回答1: Why can you not change the control's attributes without hiding it? Some options: Don't hide the controls before changing them. Show a loading animation overlay for