Search Results

Search found 219 results on 9 pages for 'flicker'.

Page 2/9 | < Previous Page | 1 2 3 4 5 6 7 8 9  | Next Page >

  • Refactor custom wizard to reduce flicker

    - by Matthew Brown
    I have implemented a custom wizard control in C# windows forms by creating a base form which has the shared components and then making child forms for each step of the process. I then have a class which hides/shows the child forms when you move from one step to another. The problem is that flickering is bad when moving between forms. Does anyone know a way to either keep this method and reduce the flicker or refactor it to make it use a single form (which should definitely reduce the flicker)?

    Read the article

  • Screen flickering / scrambling on an Asus UL30A

    - by user55059
    Recently my Laptop screen started to flicker. You can view the phenomena here: YouTube Sometimes the screen is totally scrambled, but most of the time it starts with the Title bar only. It happens inconsistently. My Laptop is Asus UL30A and I'm using Ubuntu 11.10. Output from command: sudo lshw -C display; lsb_release -a; uname -a; xrandr *-display:0 description: VGA compatible controller product: Mobile 4 Series Chipset Integrated Graphics Controller vendor: Intel Corporation physical id: 2 bus info: pci@0000:00:02.0 version: 07 width: 64 bits clock: 33MHz capabilities: msi pm vga_controller bus_master cap_list rom configuration: driver=i915 latency=0 resources: irq:44 memory:fe400000-fe7fffff memory:d0000000-dfffffff ioport:dc00(size=8) *-display:1 UNCLAIMED description: Display controller product: Mobile 4 Series Chipset Integrated Graphics Controller vendor: Intel Corporation physical id: 2.1 bus info: pci@0000:00:02.1 version: 07 width: 64 bits clock: 33MHz capabilities: pm bus_master cap_list configuration: latency=0 resources: memory:fe800000-fe8fffff LSB Version: core-2.0-ia32:core-2.0-noarch:core-3.0-ia32:core-3.0-noarch:core-3.1-ia32:core-3.1-noarch:core-3.2-ia32:core-3.2-noarch:core-4.0-ia32:core-4.0-noarch Distributor ID: Ubuntu Description: Ubuntu 11.10 Release: 11.10 Codename: oneiric Linux steelke 3.0.0-14-generic-pae #23-Ubuntu SMP Mon Nov 21 22:07:10 UTC 2011 i686 i686 i386 GNU/Linux Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192 LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 293mm x 164mm 1366x768 60.0*+ 1360x768 59.8 60.0 1024x768 60.0 800x600 60.3 56.2 640x480 59.9 VGA1 disconnected (normal left inverted right x axis y axis) HDMI1 disconnected (normal left inverted right x axis y axis) DP1 disconnected (normal left inverted right x axis y axis) DP2 disconnected (normal left inverted right x axis y axis) I already rolled back the kernel to 3.0.0-14 instead of 3.0.0-17 as mentioned in this post, but without result. I guess the problem is related to the driver, because I don't see similar behaviour in the BIOS Setup. Any tips or help is welcome.

    Read the article

  • Screen flicker -> Severe System Slowdown?

    - by Adam Robinson
    I'm using a Dell D830 laptop, and over the last few weeks it's been developing a very irritating screen flicker problem that leads to the system slowing down almost to the point of unusability. At seemingly random times (no commonality between how long the system has been running, what I was doing, what applications were open, etc.) my screen (I use two external LCD's with the laptop closed in a dock) flickers for a moment, then the system becomes incredibly slow. The screen redraws painfully slowly--almost like what you might expect to see with generic graphics drivers installed--and the entire system is maddeningly unresponsive. The only thing that seems to be able to correct the issue is a restart. I've checked the event logs and nothing out of the ordinary is there, and definitely nothing that's common to all of the events. I'm running XP Pro SP2. Any ideas?

    Read the article

  • LCD monitor flicker when connected to a laptop using VGA

    - by Björn Lindqvist
    I have a dual screen setup with two AOC e2450Sw monitors connected to a laptop. The laptop has one HDMI and one VGA output. When one of the monitors is connected using VGA, it flickers or displays static noise. The flickering is fairly subtle and only visible on darker colors. But it is there and noticable and appears like horizontal lines. The problem only appears on the monitor connected to the laptop using the VGA cable. If I swap the monitors, the one connected using VGA is displaying the flicker but not the one connected using HDMI. The simple solution would ofcourse be to connect both monitors using HDMI, but since the laptop only has one VGA and one HDMI out that isn't possible. I've tried tweaking the monitor setting using the OSD menu, but it had little or no effect. Update: After several more trouble shooting hours, it seems the problem is not related to the monitor or VGA cable as the problem persists even if I swap the display with another brand and different cables. So it may be the graphics card? Intel HD Graphics 4000. The laptop is Acer Aspire E1-571.

    Read the article

  • Screen Flicker on a black MacBook

    - by sixtyfootersdude
    I have a MacBook Black. For about the last six months I have had a strange screen flicker when I: start my machine and plug in the power cord of my machine This morning when I woke up my computer the screen backlight did not turn on at all. When I held the computer in direct sunlight I could see the screen and I could tell that everything was working normally (other than the backlight). Pressing the screen brightness controls (F2) brought up the brightness panel. The brightness panel informed me that the screen was at maximum brightness. I did a bit of Searching and this is what I found: This post describes how to buy and replace a macbook screen. Do you think that this would solve my problem? Additional info: I am running 10.6.4 I recently upgraded from 10.4. I experienced similar issues in 10.4. I am pretty sure that this is a hardware issue. The problem does not occur when the screen is at a specific angle. It usually only happens at startup/wakeup or when the power is plugged/unplugged.

    Read the article

  • netbook intel GMA 3150 external monitor 1920x1080 flicker problem

    - by seyenne
    Dear all, i recently purchased a acer netbook (apsire one d260). It runs flawlessly. Yesterday I bought a samsung 23" TFT with a native resolution of 1920x1080. According to the information found in the internet and my local computer dealer, the intel chipset can handle the native resolution of the monitor. However, this is only partly the case. I use the VGA cabel to connect, the monitor instantly switches to the native resolution and now the problem: Occasionaly, especially the first 2 hours after booting up, I have a flickering all over the screen, sometimes the entire screen is shaking and spinning around like crazy. I figured out, that lowering the resolution avoids the flicker but this helps only for some time. I can rule out that it's the monitor's problem since I found no issues with another notebook. Right now, I have no problems with the netbook, for about 30 minutes I didn't experience any issues... But I don't know for how long, it occurs without warning :-) I'm worried that if I would bring the netbook back to the dealer and explain my problem, after testing it on an external screen in the local shop, everything works just fine... And I won't get helped with the problem because I can't prove it. (I'm currently in Thailand and over here, customer service is nothing like back home in Germany) What can I do? Is this a driver related issue? (I installed the latest GPU driver) Is it because of the VGA cable? (But why does it work sometimes without any problems and with no issues on the other notebook) I monitored the GPU/CPU temperature, nothing changes really over time..Can it simply be a faulty GPU and is a replacement justifiable? I'm really stressed now because for the time I'm writing, the flickering didn't occur...but for sure, soon or later it will happen again.. I Forgot to mention, the problem also happens if the netbook runs on battery, unplugged. So the only hardware that is plugged is the TFT screen. ...........and here it comes again, flickering has just begun. NEED HELP! Thank you all for reading through this and giving any suggestions if possible. Cheers

    Read the article

  • flex tabnavigator skin flicker

    - by Proyb2
    I am try to skin my tabnavigator with PNG, and extend with TabSkin.as and SelectedTabSkin.as, however, when I tried to mouseover, it will caused a flicker into black and load the tab image which I define. What can I do to avoid flicker? TabSkin.as same as SelectedTabSkin.as but different image package { import mx.controls.Image; public class TabSkin extends Image { public function TabSkin():void { super(); } override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { super.updateDisplayList(unscaledWidth, unscaledHeight); } } } Tab.MXML TabNavigator { tabHeight: 39; tab-width: 108; tabOffset: 1; tabStyleName: "tab"; } .tab { fillColors: #000000, #000000; up-skin: ClassReference("TabSkin"); down-skin: ClassReference("TabSkin"); over-skin: ClassReference("TabSkin"); selected-up-skin: ClassReference("SelectedTabSkin"); selected-down-skin: ClassReference("SelectedTabSkin"); selected-over-skin: ClassReference("SelectedTabSkin"); } .selectedTab { font-weight: bold; corner-radius: 0; } <mx:TabNavigator x="223" y="82" width="100%" height="100%" id="tab2"/>

    Read the article

  • HP EliteBook 8440p screen flickers after blank screen (nvidia)

    - by fliegenderfrosch
    When my screen turns blank after 10 min or after locking the screen and I begin using the laptop again, the screen is flickering. It looks as if every second line of pixels is blinking and the flickering is mainly present in the upper part of the screen. I am using Ubuntu 12.04 with the latest binary Nvidia drivers (current-updates). lshw | grep VGA tells me: 01:00.0 VGA compatible controller: NVIDIA Corporation GT218 [NVS 3100M] (rev a2) The problem doesn’t occur after sleeping or on an external display. I used Kubuntu 11.10 before, where the problem didn’t occur either. Is there anything I can do except waiting for new drivers?

    Read the article

  • Monitor blinking

    - by Shark
    Hi I have Ubuntu 10.04, my laptop is ASUS k50ij, intel duo t3000, 2gb ram, 320 HDD, intel gma 4500M video card. My problem is that a couple days ago my monitor had start blinking for a few seconds. Then it stops and begins the same behaviour let's say in next 2 hours. What am i missing here? Another funny problem is that when i give more or less brightness to monitor the pop up window shows and giving "Power information: Laptop battery is charged". When my brightness is lower the blinking increases and vice versa. thx for help

    Read the article

  • HP Pavillion laptop screen problems

    - by Liealais Vards Nekas
    Approximately after 4 days when I installed my Ubuntu 10.10 an interesting problem with my laptop screen starts. I had similar problem what you can see in this video - http://www.youtube.com/watch?v=jCYVfGVGWyY&feature=related - but it doesn't happen all the time. The most interesting thing is that, than I had that problem only when I turn my laptop screen in different angle. And this "bad" angle changes by the time, so after about 15 minutes after booting computer I can turn laptop screen in normal position. This is software or hardware problem? I'm using HP Pavillion dv9000.

    Read the article

  • Flickering/Flashing screen problem related to keyboard

    - by LeandroCR
    This will seems quite bizarre but that's a huge problem for me, I'm facing it for a long time since Ubuntu 12.04. My Ubuntu/Linux Mint/Debian (Unity/Gnome) always starts flickering after using the computer for a while, I always thought this had something to do with the video board. I have an Vostro 3550 (Radeon 6xxx/Intel Onboard). First I realized that when I was navigating trough an website, when i selected with the mouse a combo, the combo closed it self automatically then the screen starts flickering. The i realized when i was trying to make the login in the terminal (crtl + alt + f1) a strange character appears, like: ^@ repeatedly. When i keep CRTL pressed the system never flickers! I have absolutely no problem using Windows. What can i do? There is no such thing as Keyboard driver on Dell Support. I would love to use Ubuntu only, but this is very annoying. Problem happens on Ubuntu 12.04, .10 and 13.04 Linux Mint 15 (Cinnamon) Debian Live with Gnome

    Read the article

  • 12.04 Screen goes OFF and ON and hangs

    - by SKC
    i have installed ubuntu 12.04. while i'm using the screen goes off, comes back on (during which time, the system is not responsive) and this process repeats one more time in immediate succession after which the computer is responsive again. sometimes the system hangs indefinitely. sometimes the windows go blank. only the title bars are seen. i have tried re-installing the OS three times with no improvements. i have tried both 32 bit as well as 64 bit. i have no idea what the problem is and have tried hard to pin point that. i never had this prob till 11.10 my system config is as follow processor - 2nd gen intel core i7 (2660k) graphics - intel onboard HD graphics 3000 (no external graphics card) RAM - 4GB none of my friends seem to experience this problem. it really gets annoying as it happens really often. please advice

    Read the article

  • cursor jumps when moving (and some other times)

    - by nyne
    i updated to 12.10 beta 1 when it was released (coming from 12.04 fresh install, i skipped the alpha releases of 12.10) since then i've done all the usual updates but ive had an issue with my cursor jumping. it does not jump when typing, i've done a lot of searching and cant find an answer, it tends to happen most when i move the cursor the jump is maybe 15-20 pixels down and to the right it seems like a display issue because if i hover over a link or the x to close a window the cursor will settle in it's down/right position, but the whatever im hovering over will still act as if that's where the mouse is, and clicking still works on the item. so the mouse is actually in its original location, but it's displaying offset and flickering back and forth from its down/right position and its correct position this makes use very difficult because the mouse is never displayed where it actually is and i have to estimate my clicks any ideas?

    Read the article

  • Screen flicker during content update, especially in Firefox

    - by Denis Malinovsky
    I'm using Nouveau video driver for my NVIDIA GeForce 6150SE nForce 430 video-card with Ubuntu 10.04. Screen flickers frequently, especially when I'm loading pages with many images/banners in Firefox. I tried to use proprietary NVIDIA driver, but it behaves itself even worse. Nv driver doesn't work at all. I also filed a bugreport in launchpad if you need any additional information.

    Read the article

  • doublebuffering not reducing the flicker

    - by fishhead
    I am drawing an grid-work of objects in a Panel. when I scroll the the panel quickly I get a flicker. I thought that enabling the double buffering may take care of this but what I find is that it does not completely draw everything and I am left with blank sections. could anyone give me suggestions as to what may be happening and how I might correct it. UPDATE: I found that I was creating the graphics object with Creategraphics() rather than using the Parameter in the paint method

    Read the article

  • jQuery slideToggle flicker in Firefox

    - by Stepppo
    I have a specific situation with slideToggle that creates a flicker in Firefox. The situation was when the expanding element goes longer than the page and a vertical scrollbar appears in Firefox. If you scroll down to read all of the text in the expanding element and then click on the trigger to close the element, Firefox would flash for a second and then the page readjusts and returns to its position before the expanded element was expanded. I have tried adding ‘return false;’ to no avail. Here's a test page where you can see the effect in FF when you click to close the last item (Herbal Teas): http://pollak-labs.com/clients/birthyourself/?page_id=21

    Read the article

  • Resizing JPopupMenu and avoiding a "flicker" issue

    - by Avrom
    Hi, I am trying to implement a search results popup list similar to the style found here: http://www.inquisitorx.com/ (I'm not trying to implement a Google search, I'm just using this as a rough example of the style I'm working on.) In any event, I am implementing this by using a JList contained within a JPopupMenu which is popped up underneath a JTextField. When a user enters search terms, the list changes to reflect different matching results. I then call pack on the JPopupMenu to resize it. This works, however, it creates a slight flicker effect since it is actually hiding the popup and showing a popup. (See the private method getPopup in JPopupMenu where it explicitly does this.) Is there any way to just get it to just resize itself (aside from using a JWindow)?

    Read the article

  • Firefox jquery flicker bug problem

    - by Dan
    This is possibly a really silly question but I've stared at this code way too long for it to make sense! I'm having problems with a flicker of the screen in firefox; It is related a filtering script... I have a website that is a one page vertical scroll; with different anchors to define sections and a smooth scroll script to make it pretty... See the example here: http://tiny.cc/7g5mn I've tried everything... Please help me, I'm begging you, my eyes hurt!

    Read the article

  • How to fix flicker when using Webkit transforms & transitions

    - by gargantaun
    I have a very simple demo working that uses Webkit transforms and transitions for smooth horizontal scrolling between 'panels' (divs). The reason I want to go this route as opposed to a Javascript driven system is that it's for the iPad and Javascript performance is quite poor, but the css transforms and transitions are smooth as silk. Sadly though, I'm getting a lot of flicker on the iPad with my Demo. You can see the demo here You'll need safari or and iPad to see it in action. I've never seen this happening in any of the demos for transforms and transitions so I'm hopeful that this is fixable. Anyway here's the code that powers the thing.... The HTML looks like this. <html> <head> <title>Swipe Demo</title> <link href="test.css" rel="stylesheet" /> <link href="styles.css" rel="stylesheet" /> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="functions.js"></script> <script type="text/javascript" src="swiping.js"></script> </head> <body> <div id="wrapper"> <div class='panel one'> <h1>This is panel 1</h1> </div> <div class='panel two'> <h1>This is panel 2</h1> </div> <div class='panel three'> <h1>This is panel 3</h1> </div> <div class='panel four'> <h1>This is panel 4</h1> </div> </div> </body> </html> The CSS looks like this body, html { padding: 0; margin: 0; background: #000; } #wrapper { width: 10000px; -webkit-transform: translateX(0px); } .panel { width: 1024px; height: 300px; background: #fff; display: block; float: left; position: relative; } and the javascript looks like this // Mouse / iPad Touch var touchSupport = (typeof Touch == "object"), touchstart = touchSupport ? 'touchstart' : 'mousedown', touchmove = touchSupport ? 'touchmove' : 'mousemove', touchend = touchSupport ? 'touchend' : 'mouseup'; $(document).ready(function(){ // set top and left to zero $("#wrapper").css("top", 0); $("#wrapper").css("left", 0); // get total number of panels var panelTotal; $(".panel").each(function(){ panelTotal += 1 }); // Touch Start // ------------------------------------------------------------------------------------------ var touchStartX; var touchStartY; var currentX; var currentY; var shouldMove = false; document.addEventListener(touchstart, swipeStart, false); function swipeStart(event){ touch = realEventType(event); touchStartX = touch.pageX; touchStartY = touch.pageY; var pos = $("#wrapper").position(); currentX = parseInt(pos.left); currentY = parseInt(pos.top); shouldMove = true; } // Touch Move // ------------------------------------------------------------------------------------------ var touchMoveX; var touchMoveY; var distanceX; var distanceY; document.addEventListener(touchmove, swipeMove, false); function swipeMove(event){ if(shouldMove){ touch = realEventType(event); event.preventDefault(); touchMoveX = touch.pageX; touchMoveY = touch.pageY; distanceX = touchMoveX - touchStartX; distanceY = touchMoveY - touchStartY; movePanels(distanceX); } } function movePanels(distance){ newX = currentX + (distance/4); $("#wrapper").css("left", newX); } // Touch End // ------------------------------------------------------------------------------------------ var cutOff = 100; var panelIndex = 0; document.addEventListener(touchend, swipeEnd, false); function swipeEnd(event){ touch = (touchSupport) ? event.changedTouches[0] : event; var touchEndX = touch.pageX; var touchEndY = touch.pageY; updatePanelIndex(distanceX); gotToPanel(); shouldMove = false; } // -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- function updatePanelIndex(distance){ if(distanceX > cutOff) panelIndex -= 1; if(distanceX < (cutOff * -1)){ panelIndex += 1; } if(panelIndex < 0){ panelIndex = 0; } if(panelIndex >= panelTotal) panelIndex = panelTotal -1; console.log(panelIndex); } // -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- function gotToPanel(){ var panelPos = getTotalWidthOfElement($(".panel")) * panelIndex * -1; $("#wrapper").css("-webkit-transition-property", "translateX"); $("#wrapper").css("-webkit-transition-duration", "1s"); $("#wrapper").css("-webkit-transform", "translateX("+panelPos+"px)"); } }); function realEventType(event){ e = (touchSupport) ? event.targetTouches[0] : event; return e; }

    Read the article

  • jQuery SlideDown Flickering in Firefox

    - by Sithlord
    Hi, once more a jQuery, Firefox flickering issue. (no flickering in IE6/7/8, Safari) I uploaded an example page here: http://sithlord.bplaced.net/testing/jquery_flickering/flickering.html There are two div containers. The inner div is the one I'm hiding. The outer one is the wraping container with the style elements. I found the flicker only occur with the selectbox. Without the SelectBox there is no flickering. But thats not all: (I cant post a second hyperlink: its the same link as above; only change "flickering.html" to not_flickering.html) In this case I selected a lower "option" - as you can see, the flicker disappears in this case. The same is happending, when there are less options in total. (less then about 20) The only workaround I found is deleting the selectbox :) Any ideas, why this is happening and how to fix it? Thanks!

    Read the article

  • drawImage in Java applet flickers in Safari

    - by lcvinny
    I'm having a flicker problem in a Java applet in Safari (Mac). However, it's not the usual double buffering problem. I have isolated it down to one single drawImage call (no redundant repaint, no clear is called), which gives a white flicker before painting the image but not on every repaint. In fact, I measured the duration of the drawImage call, which is normally about 1ms, but up to 30ms about every 5th time paint is called, which is when it flickers. Repaints are triggered when I drag a component or when the window is scrolled. Is this a bug in the java implementation on OSX, and is there a fix for it?

    Read the article

  • WPF Storyboard flicker issue

    - by Vinjamuri
    With the code below, the control flickers whenever the image is changed for MouseOver/MousePressed? I am using Storyboard and Double animation.The image display is very smooth with WPF Triggers but not with Storyboard. Can anyone help me to fix this issue? <Style TargetType="{x:Type local:ButtonControl}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type local:ButtonControl}"> <Grid> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="CommonStates"> <VisualState x:Name="Normal"> <Storyboard> <DoubleAnimation Duration="00:00:00.20" Storyboard.TargetName="imgNormal" Storyboard.TargetProperty="Opacity" To="1" /> </Storyboard> </VisualState> <VisualState x:Name="MouseOver"> <Storyboard> <DoubleAnimation Duration="00:00:00.20" Storyboard.TargetName="imgOver" Storyboard.TargetProperty="Opacity" To="1" /> </Storyboard> </VisualState> <VisualState x:Name="Disabled"> <Storyboard> <DoubleAnimation Duration="00:00:00.20" Storyboard.TargetName="imgDisable" Storyboard.TargetProperty="Opacity" To="1" /> </Storyboard> </VisualState> <VisualState x:Name="Pressed"> <Storyboard> <DoubleAnimation Duration="00:00:00.20" Storyboard.TargetName="imgPress" Storyboard.TargetProperty="Opacity" To="1" /> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <Grid> <Border x:Name="imgNormal" Opacity="0"> <Image Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NormalImage}" Stretch="UniformToFill"/> </Border> </Grid> <Grid> <Border x:Name="imgOver" Opacity="0"> <Image Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MouseOverImage}" Stretch="UniformToFill"/> </Border> </Grid> <Grid> <Border x:Name="imgDisable" Opacity="0"> <Image Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DisableImage}" Stretch="UniformToFill"/> </Border> </Grid> <Grid> <Border x:Name="imgPress" Opacity="0"> <Image Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MousePressImage}" Stretch="UniformToFill"/> </Border> </Grid> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style>

    Read the article

  • Uploading image to flicker in c++

    - by Alien01
    I am creating an application in VC++ using win32,wininet to upload an image to Flickr.I am able to get Frob,Token correctly but when I try to upload the image I am getting error Post size too large. Headers are created as follows wstring wstrAddHeaders = L"Content-Type: multipart/form-data;boundary=ABCD\r\n"; wstrAddHeaders += L"Host: api.flickr.com\r\n"; wchar_t tempStr[MAX_PATH]; wsprintf(L"Content-Length: %ld\r\n",szTotalSize); wstrAddHeaders += tmpStr; wstrAddHeaders +=L"\r\n"; HINTERNET hSession = InternetConnect(hInternet, L"www.flickr.com", INTERNET_DEFAULT_HTTP_PORT, NULL,NULL, INTERNET_SERVICE_HTTP, 0, 0); if(hSession==NULL) { dwErr = GetLastError(); return; } Content of Post request are created as follows: wstring wstrBoundry = L"--ABCD\r\n"; wstring wstrContent =wstrBoundry; wstrContent +=L"Content-Disposition: form-data; name=\"api_key\"\r\n\r\n"; wstrContent +=wstrAPIKey.c_str() ; wstrContent += L"\r\n"; wstrContent +=wstrBoundry; wstrContent +=L"Content-Disposition: form-data; name=\"auth_token\"\r\n\r\n"; wstrContent +=m_wstrToken.c_str(); wstrContent += L"\r\n"; wstrContent +=wstrBoundry; wstrContent +=L"Content-Disposition: form-data; name=\"api_sig\"\r\n\r\n"; wstrContent +=wstrSig; wstrContent += L"\r\n"; wstrContent +=wstrBoundry; wstrContent +=L"Content-Disposition: form-data; name=\"photo\"; filename=\"C:\\test.jpg\""; wstrContent +=L"\r\n"; wstrContent +=L"Content-Type: image/jpeg\r\n\r\n"; wstring wstrFilePath(L"C:\\test.jpg"); CAtlFile file; HRESULT hr = S_OK; hr = file.Create(wstrFilePath.c_str(),GENERIC_READ,FILE_SHARE_READ,OPEN_EXISTING); if(FAILED(hr)) { return; } ULONGLONG nLen; hr = file.GetSize(nLen); if (nLen > (DWORD)-1) { return ; } char * fileBuf = new char[nLen]; file.Read(fileBuf,nLen); wstring wstrLastLine(L"\r\n--ABCD--\r\n"); size_t szTotalSize = sizeof(wchar_t) * (wstrContent.length()) +sizeof(wchar_t) * (wstrLastLine.length()) + nLen; unsigned char *buffer = (unsigned char *)malloc(szTotalSize); memset(buffer,0,szTotalSize); memcpy(buffer,wstrContent.c_str(),wstrContent.length() * sizeof(wchar_t)); memcpy(buffer+wstrContent.length() * sizeof(wchar_t),fileBuf,nLen); memcpy(buffer+wstrContent.length() * sizeof(wchar_t)+nLen,wstrLastLine.c_str(),wstrLastLine.length() * sizeof(wchar_t)); hRequest = HttpOpenRequest(hSession, L"POST", L"/services/upload/", L"HTTP/1.1", NULL, NULL, 0, NULL); if(hRequest) { bRet = HttpAddRequestHeaders(hRequest,wstrAddHeaders.c_str(),wstrAddHeaders.length(),HTTP_ADDREQ_FLAG_ADD | HTTP_ADDREQ_FLAG_REPLACE); if(bRet) { bRet = HttpSendRequest(hRequest,NULL,0,(void *)buffer,szTotalSize); if(bRet) { while(true) { char buffer[1024]={0}; DWORD read=0; BOOL r = InternetReadFile(hRequest,buffer,1024,&read); if(read !=0) { wstring strUploadXML =buffer; break; } } } } I am not pretty sure the way I am adding image data to the string and posting the request. Do I need to convert image data into Unicode? Any suggestions , if someone can find what I am doing wrong that would be very helpful to me.

    Read the article

  • In Android GUI flickers when reading the properties file

    - by ManojValiveti
    Hi, I am getting the GUI flicker when reading a file properties and accordingly enabling/disabling checkbox and List value in listbox. when i remove this file reading code the GUI doesnt have flicker. I am reading the properties before creating the Preferences in OnCreate(). Attached the file write code below for reference.Please let us know is there any other way to read and update the preference staus. private void SetExtendConf(String key, String strValue) { mProperties = new Properties(); try { File file = new File(FILE_EXT); if(!file.exists()) file.createNewFile(); file.setWritable(true,false); FileInputStream fis = new FileInputStream(file); mProperties.load(fis); fis.close(); FileOutputStream stream = new FileOutputStream(file); Log.d(TAG, "Setting Values " + key + ":"+ strValue); mProperties.setProperty(key, strValue); mProperties.store(stream,"ext.conf"); stream.close(); } catch (IOException e) { Log.d(TAG, "Could not open properties file: " + GPS_FILE_EXT); } } -Manoj

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9  | Next Page >